package com.shuma.auth.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shuma.auth.entity.RestBean;
import com.shuma.auth.model.dto.PageParams;
import com.shuma.auth.model.po.OperateRecord;
import com.shuma.auth.service.OperateRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lele
 */
@Slf4j
@RestController
@RequestMapping("operateRecord")
public class OperateRecordController {

    @Autowired
    private OperateRecordService  operateRecordService;

    /**
     * 分页查询操作记录表
     * @param pageParams
     * @return
     */
    @PostMapping("/operate")
    public RestBean<Page<OperateRecord>> pageOperateRecord(PageParams pageParams){
        Page<OperateRecord> operateRecordPage = operateRecordService.pageOperateRecord(pageParams);
        return RestBean.success(operateRecordPage);
    }
}
